﻿@model MAPDavy.Entities.Seccion

@{
    ViewBag.Title = "Create";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

@section JavaScript{
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

<script type="text/javascript">
    $(document).ready(function () {
        $('#guardar').click(function () {
            $('form').submit();
        });
    });
</script>
       
}
<div class="cpanel ui-widget ui-widget-content ui-corner-all">
    <table class="toolbar">
        <tr>
            <td valign="middle" >
                <img src="@Url.Content("~/Content/images/newTask.png")" alt="Secciones" />
            </td>
            <td class="tdHeader"><span class="header">Crear Sección</span></td>
            <td class="cerrado"><center>
                <a href="#" id="guardar">
                   <img src="@Url.Content("~/Content/images/save.png")" title="Guardar" alt="Guardar" />
                    <br /><span class="label">Guardar</span>
                </a></center>
            </td>
            <td><center>
                <a href="@Url.Action("Index", "Seccion")">
                    <img src="@Url.Content("~/Content/images/back.png")" title="Candelar" alt="Candelar" />
                    <br /><span class="label">Cancelar</span>
                </a></center>
            </td>
        </tr>
    </table>
</div>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Seccion</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.GradeId,"Grade")
        </div>
        <div class="editor-field">
            @Html.DropDownList("GradeId")
            @Html.ValidationMessageFor(model => model.GradeId)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.ClassName, "Class Name")
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.ClassName)
            @Html.ValidationMessageFor(model => model.ClassName)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Description)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Description)
            @Html.ValidationMessageFor(model => model.Description)
        </div>
    </fieldset>
}